package co.yixiang.yshop.module.crm.controller.admin.crmanalysis;

import co.yixiang.yshop.framework.common.pojo.CommonResult;
import co.yixiang.yshop.module.crm.controller.admin.crmanalysis.vo.AchievementPageReqVO;
import co.yixiang.yshop.module.crm.controller.admin.crmanalysis.vo.ContractVO;
import co.yixiang.yshop.module.crm.controller.admin.crmanalysis.vo.CustomerLevelVO;
import co.yixiang.yshop.module.crm.service.crmanalysis.RankService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static co.yixiang.yshop.framework.common.pojo.CommonResult.success;

@Tag(name = "管理后台 - 排名分析")
@RestController
@RequestMapping("/crm/analysis-rank")
@Validated
public class RankController {

    @Resource
    private RankService rankService;



    @GetMapping("/contract")
    @Operation(summary = "获得合同排名")
    public CommonResult<List<ContractVO>> getContractRank() {
        return success(rankService.getContractRank());
    }

    @GetMapping("/receivables")
    @Operation(summary = "获得回款排名")
    public CommonResult<List<ContractVO>> getRecevablesRank() {
        return success(rankService.getReceivablesRank());
    }





}